package featuremodel.method;

import featuremodel.FeatureRep;
import skyblue.Method;
import skyblue.SkyBlueDef;
import skyblue.Variable;

public class SetUnbindMethod extends Method{
	private Variable a;
	
	public SetUnbindMethod(Variable a){
		this.a = a;
		getOutputs().add(a);
		
	}
	public void setTobeMethodType(){
		
		a.setTobemethodtype(SkyBlueDef.METHOD_TYPE_UNBIND);
	}
	public void clearTobeMethodType() {
		a.setTobemethodtype(null);
	}
	
	public void setTobeMethodType2(){
		
		a.setTobeMethodType2(SkyBlueDef.METHOD_TYPE_UNBIND);
	}
	
	public void clearTobeMethodType2(){
		a.setTobeMethodType2(null);
	}

	public void execute(){
		
		FeatureRep c = (FeatureRep)a.getValue().getValuerep();
		c.setBindState(SkyBlueDef.VARIABLE_UNBIND);
		a.setMethodtype(SkyBlueDef.METHOD_TYPE_UNBIND);
		a.setTobemethodtype(null);
	}

	public Variable getA() {
		return a;
	}

	public void setA(Variable a) {
		this.a = a;
	}

}
